// 导入axios实例
import httpRequest from "../axios";
//增加Form
interface Form {
  sayName: string;
  sayEname: string;
  sayImg: string;
  sayContent: string;
}
//修改Form
interface Form2 {
  id: number;
  sayName: string;
  sayEname: string;
  sayImg: string;
  sayContent: string;
}
//查询全部
export function aphGet() {
  return httpRequest({
    url: "/index/get/indexSay",
    method: "get",
  });
}
//根据id查询单个
export function aphGetOne(id) {
  return httpRequest({
    url: "/index/get/indexSay/" + id,
    method: "get",
  });
}

//增加一个
export function aphAdd(param: Form) {
  return httpRequest({
    url: "/index/post/addSay",
    method: "post",
    data: param,
  });
}
//删除一个
export function aphGDelete(id) {
  return httpRequest({
    url: "/index/get/deleteSay/" + id,
    method: "get",
  });
}
//修改一个
export function aphEdit(param: Form2) {
  return httpRequest({
    url: "/index/post/editSay",
    method: "post",
    data: param,
  });
}
